<script setup>
import LeftNav from '../components/LeftNav.vue';
import { onMounted, defineProps } from 'vue';
import { useArticleStore } from '../store';
import { getArticleList } from '../request/api/article';
const store = useArticleStore();
const { setArticleList } = store;

const getList = async () => {
    await getArticleList().then(res => {
        setArticleList(res.data.data)
    })

}
onMounted(() => {
    getList()
}
)


</script>

<template>
    <div class="layout">
        <div class="left">
            <LeftNav />
        </div>
        <div class="content">
            <router-view></router-view>
        </div>
    </div>
</template>

<style lang="scss" scoped>
.layout {
    display: flex;
    height: 100%;
    width: 100%;

    .left {
        z-index: 999;
    }

    .content {
        margin-left: 200px;
        width: 100%;
        background-color: #F4F5F7;
        border-radius: 40px 0 0 0;
        overflow: hidden;
    }
}
</style>